package com.tms.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName tms_driver
 */
@TableName(value ="t_tms_driver")
@Data
public class TmsDriver implements Serializable {
    /**
     * 
     */
    @TableId(value = "driver_id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "driver_gender")
    private String gender;

    /**
     * 
     */
    @TableField(value = "driver_name")
    private String name;

    /**
     * 
     */
    @TableField(value = "driver_phone")
    private String phone;

    /**
     * 
     */
    @TableField(value = "driver_truck_num")
    private String truckNum;

    /**
     * 
     */
    @TableField(value = "driver_state")
    private String state;

    /**
     * 
     */
    @TableField(value = "driver_location")
    private String location;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TmsDriver other = (TmsDriver) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getTruckNum() == null ? other.getTruckNum() == null : this.getTruckNum().equals(other.getTruckNum()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getTruckNum() == null) ? 0 : getTruckNum().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", gender=").append(gender);
        sb.append(", name=").append(name);
        sb.append(", phone=").append(phone);
        sb.append(", truck_num=").append(truckNum);
        sb.append(", state=").append(state);
        sb.append(", location=").append(location);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}